/*
 * @文件描述:ADC抽象接口
 * @版本:
 * @作者:周晨阳
 * @Date:2021-10-11 19:34:33
 */
#ifndef __ADC_H
#define __ADC_H
#include "public.h"

#define MY_ADC_CHANNEL_0 0
#define MY_ADC_CHANNEL_1 1
#define MY_ADC_CHANNEL_2 2
#define MY_ADC_CHANNEL_3 3
#define MY_ADC_CHANNEL_4 4
#define MY_ADC_CHANNEL_5 5
#define MY_ADC_CHANNEL_6 6
#define MY_ADC_CHANNEL_7 7
#define MY_ADC_CHANNEL_8 8
#define MY_ADC_CHANNEL_9 9
#define MY_ADC_CHANNEL_10 10
#define MY_ADC_CHANNEL_11 11
#define MY_ADC_CHANNEL_12 12
#define MY_ADC_CHANNEL_13 13
#define MY_ADC_CHANNEL_14 14
#define MY_ADC_CHANNEL_15 15

void ADC_Inilize(u8 channel, u32 freq);
void ADC_PowerControl(u8 pwr);
u16 Get_ADC_Result(u8 channel); //channel = 0~7
float getInputVoltage(u8 channel);
void setADC_SampleFreq(u32 freq);
u8 angle2ADCMap(u8 angle);
float getInputVoltageByAngle(u8 angle);
u16 Get_ADC_ResultByAngle(u8 angle);
#endif
